#build Main.exe

#-------------------------------------------Compiler-------------------------------------------#
cc			=		g++




#-------------------------------------------Header Path-------------------------------------------#
VPATH 		= 		./src	:	./src/UI	:	./src/core	:	./src/UI/widget
					

#-------------------------------------------wxWidgets Path-------------------------------------------#
WX			=		E:\DEVELOPMENT\DEV\wxMSW-2.8.12
			
#-------------------------------------------Include Path-------------------------------------------#
INCLUDE		=		-I$(WX)\include					\
					-I$(WX)\lib\gcc_lib\mswu		\
					-I$(WX)\contrib\include			\
					-I.\src\core\					\
					
					
					
					
#-------------------------------------------Precompiler-------------------------------------------#
MACRO		=		-DWIN32						\
					-DUNICODE					\
					-DwxUSE_WX_RESOURCES		\
					-DwxUSE_PROLOGIO			\
				
				
				
				
#-------------------------------------------Lib Path-------------------------------------------#	
LIBPATH		=		-L$(WX)\lib			\
					-L$(WX)\lib\gcc_lib	\

					
					
					
					
#-------------------------------------------Lib File-------------------------------------------#
LIB			=		-lwxmsw28u_core				\
					-lwxbase28u					\
					-lwxbase28u_net				\
					-lwxbase28u_odbc			\
					-lwxbase28u_xml				\
					-lwxexpat					\
					-lwxjpeg					\
					-lwxmsw28u_adv				\
					-lwxmsw28u_aui				\
					-lwxmsw28u_dbgrid			\
					-lwxmsw28u_html				\
					-lwxmsw28u_media			\
					-lwxmsw28u_richtext			\
					-lwxmsw28u_xrc				\
					-lwxpng						\
					-lwxregexu					\
					-lwxtiff					\
					-lwxzlib					\
					-lkernel32					\
					-luser32					\
					-lgdi32						\
					-lcomdlg32					\
					-lwinspool					\
					-lwinmm						\
					-lshell32					\
					-lcomctl32					\
					-lole32						\
					-loleaut32					\
					-luuid						\
					-lrpcrt4					\
					-ladvapi32					\
					-lwsock32					\
					-lodbc32					\




#-------------------------------------------Build Target-------------------------------------------#
TARGET		=		$(TAGPATH)\SPTT.exe
TAGPATH		=		bin


#-------------------------------------------Object-------------------------------------------#
OBJ			=		Main.o				\
					MainFrame.o			\
					GUI_Button.o		\
					GUI_ComboBox.o		\
					GUI_Panel.o			\


#-------------------------------------------Source-------------------------------------------#
SRC			=		Main.cpp			\
					MainFrame.cpp		\
					GUI_Button.cpp		\
					GUI_ComboBox.cpp	\
					GUI_Panel.cpp		\


#-------------------------------------------Begin-------------------------------------------#

$(TARGET)	:	$(OBJ)
	md	$(TAGPATH)
	$(cc) -g -o  $(TARGET) $(OBJ) $(LIB) $(LIBPATH) -Wl,--subsystem,console
	

$(OBJ)		: 	$(SRC)
	$(cc) -g -c -Wall $(INCLUDE) $(MACRO) $^
	
	
#-------------------------------------------End-------------------------------------------#
clean :
	del $(OBJ) $(TAGPATH)\*.exe
	rd $(TAGPATH)